{% load helpers %}
{% load plugins %}
{% load static %}

<script src="{% static 'dist/js/nautobot.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=dist/js/nautobot.js'"></script>
<script src="{% static 'dist/js/libraries.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=dist/js/libraries.js'"></script>
<script src="{% versioned_static 'js/forms.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=js/forms.js'"></script>
<script src="{% versioned_static 'js/table_sorting_indicator.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=js/table_sorting_indicator.js'"></script>
<script src="{% versioned_static 'js/dropdown.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=js/dropdown.js'"></script>
<script type="text/javascript">
    var nautobot_static_url = "{% static '' %}";
    var nautobot_api_path = "{% url 'api-root' %}";
    var nautobot_csrf_token = "{{ csrf_token }}";
    var loading = $(".loading");
    $(document).ajaxStart(function() {
        loading.show();
    }).ajaxStop(function() {
        loading.hide();
    });
</script>
<script type="text/javascript">
    hljs.configure({ cssSelector: '.language-graphql, .language-json, .language-xml, .language-yaml' });
    hljs.highlightAll();
</script>
{% if settings.BRANDING_FILEPATHS.javascript %}
    <script src="{% custom_branding_or_static 'javascript' None %}"></script>
{% endif %}
{% if nav_menu %}
    {{ nav_menu|json_script:'nav_menu' }}
{% endif %}
